home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 July / july_2000.iso / Site Building / A-Soft Analog Shell 2.0 / A-Soft Analog Shell 2.msi / Instal01.cab / _F8F9393BE96F11D3AD4F002018280775 < prev    next >
Encoding:
Text File  |  2000-02-21  |  6.6 KB  |  134 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html> <head>
  3. <title>Readme for analog -- cache files</title>
  4. </head>
  5.  
  6. <body>
  7. [ <a href="Readme.html">Top</a> | <a href="custom.html">Up</a> |
  8. <a href="compout.html">Prev</a> | <a href="dns.html">Next</a> |
  9. <a href="map.html">Map</a> | <a href="indx.html">Index</a> ]
  10. <h1>Readme for
  11. <a href="http://www.statslab.cam.ac.uk/~sret1/analog/">analog 4.03</a></h1>
  12. <h2>Cache files</h2>
  13.  
  14. Analog has the ability to archive <strong>some</strong> of the data in your
  15. logfile into a <i>cache file</i> so that the logfile can be thrown away
  16. without losing the most important data.
  17.  
  18. <p>
  19. For most people, the cache file will not be needed: compressing
  20. the logfile using a standard compression utility such as gzip will be
  21. sufficient. Compressing a logfile is very efficient owing to the large number
  22. of repeated strings: I find about 12 times compression in practice. That in
  23. itself may solve your filespace problems, without needing to throw away any
  24. information.
  25.  
  26. <p>
  27. The cache file is not the best format for post-processing the data or feeding
  28. it into a spreadsheet. For that you should use the
  29. <a href="compout.html">computer readable output style</a>.
  30.  
  31. <p>
  32. If you are going to use the cache file feature, it is very important that you
  33. understand what is and what is not recorded. It is <strong>not</strong>
  34. possible to reconstruct everything of interest in the logfile from the cache
  35. file. The cache file does contain information about the total number of
  36. requests for each host and each file, but not about, for example, which files
  37. were read by which hosts. (To do so would take up as much disk space as the
  38. compressed logfile.) So you cannot later look at only one file and see which
  39. hosts read that file. Similarly, you cannot later restrict the files or hosts
  40. by date, using <kbd>FROM</kbd> and <kbd>TO</kbd> commands.
  41. <p>
  42. In summary, you should do all the inclusions and exclusions you want when you
  43. create the cache file. If you want different sets of inclusions and exclusions,
  44. you should create several cache files from the same logfile. You cannot later
  45. apply extra inclusions and exclusions accurately.
  46. <p>
  47. A couple of other minor points: the pattern of failed requests and redirected
  48. requests over time is not recorded in the cache file. So although the total
  49. number will still be correct, the number in the last 7 days can be
  50. under-reported subsequently. And times are only recorded to five-minute
  51. resolution.
  52.  
  53. <hr>
  54. You can create a cache file by setting the <kbd>CACHEOUTFILE</kbd> to be
  55. the file you want the cache to live in. Set
  56. <pre>
  57. CACHEOUTFILE none
  58. </pre>
  59. to turn it off again. You will still get the regular output as well as the
  60. cache output, unless you request <kbd><a href="output.html#outstyle">OUTPUT
  61. NONE</a></kbd>. To avoid overwriting, you cannot set the
  62. <kbd>CACHEOUTFILE</kbd> to be a file which already exists. (Disclaimer: on
  63. some systems, race conditions may very occasionally thwart this check. Also
  64. on a few systems, making the file writeable but not readable will allow it to
  65. be overwritten). You can include the date in the name of the
  66. <kbd>CACHEOUTFILE</kbd> in the same way as described earlier for the
  67. <kbd><a href="output.html#OUTFILE">OUTFILE</a></kbd>.
  68.  
  69. <p>
  70. You can read in a previously-made cache file with the <kbd>CACHEFILE</kbd>
  71. command, or with the <kbd>+U</kbd> command line option. As with the
  72. <kbd><a href="logfile.html">LOGFILE</a></kbd> command, you can use commas
  73. and wild cards to read in several cache files, and read compressed cache
  74. files using the <kbd>UNCOMPRESS</kbd> mechanism. Note that if you don't
  75. want to read a logfile as well as the cache file, you will have to explicitly
  76. set the <kbd>LOGFILE</kbd> to <kbd>none</kbd>.
  77. <p>
  78. When analog reads in a cache file, it will respect inclusions and exclusions
  79. as far as it can, but it does not apply any more aliases to the items. (This
  80. is to avoid double-aliasing.) So you must do any aliases you want at the time
  81. you create the cache file. Similarly, it does not obey the
  82. <kbd><a href="output.html#TIMEOFFSET">LOGTIMEOFFSET</a></kbd> variable, to
  83. avoid
  84. double-offsetting, so any offset you want must be applied at cache-creation
  85. time too.
  86. <p>
  87. Sometimes you don't want to record all the types of item in the cache file.
  88. You might want to forget about which hosts had accessed your web site, for
  89. example, and only remember how many times each file was requested. You can
  90. choose not to include one type of item in the cache file by setting its
  91. <kbd><a href="lowmem.html">LOWMEM</a></kbd> to 3; for example, specify
  92. <pre>
  93. HOSTLOWMEM 3
  94. </pre>
  95. to exclude hosts from the cache file. Because this is a serious
  96. step, analog will produce a warning if you do this. You can even set all six
  97. <kbd>LOWMEM</kbd>s to 3 if you just want to remember the pattern of requests
  98. over time, not even which files were requested.
  99.  
  100. <hr>
  101. When using the cache files, you have to be careful to store separate data in
  102. each cache file. So you shouldn't use an old cache file to make a new cache
  103. file, and then analyse both cache files together. And you shouldn't use the
  104. same logfile to make two different cache files, and then analyse both cache
  105. files together. To avoid losing entries or double counting them, I suggest you
  106. follow the following procedure.
  107. <ol>
  108.   <li>Archive the old logfile, and restart the server with a fresh logfile.
  109.       (See your server documentation for how to do this.)
  110.   <li>Make both a cache file and an ordinary report from the old logfile.
  111.   <li>Make a test report from the cache file and compare it against the report
  112.       from the logfile to check it works. (This step really is worth doing!)
  113.   <li>Make the main report from all your cache files, old and new.
  114. </ol>
  115. Now you can throw away the old logfile, if you've really understood what
  116. data you're losing by doing so. (But please remember that I can take no
  117. responsibility if something goes wrong: see the
  118. <a href="Licence.txt">licence</a>.)
  119. <p>
  120. I prefer to make a separate cache file from each logfile, in case something
  121. goes wrong with one of them, rather than a single cache file combining several
  122. logfiles, or a single cache file combining an old cache file and a logfile.
  123.  
  124. <hr>
  125. <address><a HREF="http://www.statslab.cam.ac.uk/~sret1/">Stephen Turner</a>
  126. <br>Need help with analog? <a href="mailing.html">Subscribe to the analog-help
  127. mailing list</a>
  128. </address>
  129. <p>
  130. [ <a href="Readme.html">Top</a> | <a href="custom.html">Up</a> |
  131. <a href="compout.html">Prev</a> | <a href="dns.html">Next</a> |
  132. <a href="map.html">Map</a> | <a href="indx.html">Index</a> ]
  133. </body> </html>
  134.